<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $this->title;?></title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/load.js"></script>
<!--时间选择器-->
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/lang/cn_utf8.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar-setup.js"></script>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar-blue.css" />
<!--colorbox-->
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jquery.colorbox.js"></script>
<link href="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/colorbox2.css" rel="stylesheet" type="text/css"/>
<!--bi-->
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/bi.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/bi.js"></script>
<script language="javascript">
	function selCode(nu,pa){
		for(var i=1;i<=nu;i++){
			$("div#container"+i).hide();
			$("td#td"+i).removeClass("no_bottom_boder");
			$("td#td"+i).addClass("yes_boder");
		}
		$("div#container"+pa).show();
		$("td#td"+pa).removeClass();
		$("td#td"+pa).addClass("no_bottom_boder");
	}
</script>
<style>
.bi-body .bi-search-3{ height:70px;}
.bi-body .bi-search-3 .bi-s-center{height:48px;}
.bi-body .bi-search-3 .bi-s-center .bi-s-c-con{ height:26px;}
.bi-body .bi-search-3 .bi-s-center .bi-s-c-con .bi-s-c-sel td{ height:30px;}
</style>

</head>
<body style="overflow:auto;">
<div id="main" style="clear:both;">
		<div class="bi-body">
			<form id="searchForm" name="searchForm" method="post" action="" >
			<div class="bi-search   bi-search-3">
				<div class="bi-s-top"></div>
				<div class="bi-s-center">
					<div class="bi-s-c-con">
						<div class="bi-s-c-date">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
							  <tr>
								<td>开始日期：
									<input name="startTime" type="text" id="startTime" size="18" style="height:16px;" class="input" value="<?php echo $this->vars['startTime'];?>" />
							      <script type="text/javascript">Calendar.setup({"ifFormat":"%Y-%m-%d","firstDay":0,"showsTime":false,"showOthers":false,"timeFormat":24,"inputField":"startTime","button":"startTime"});</script>
								  结束日期：
									<input name="endTime" type="text" id="endTime" size="18" style="height:16px;" class="input" value="<?php echo $this->vars['endTime'];?>" />
						        <script type="text/javascript">Calendar.setup({"ifFormat":"%Y-%m-%d","firstDay":0,"showsTime":false,"showOthers":false,"timeFormat":24,"inputField":"endTime","button":"endTime"});</script>							    操作系统：                                
						        <select name="osName" id="osName" size="1">
                                  <option value="">全部</option>
                                  <option value="iphone" <?php if($this->vars['osName']=='iphone'){?>selected="selected"<?php }?>>iPhone</option>
                                  <option value="android" <?php if($this->vars['osName']=='android'){?>selected="selected"<?php }?>>Android</option>
                                  <option value="symbian" <?php if($this->vars['osName']=='symbian'){?>selected="selected"<?php }?>>Symbian</option>
                                  <option value="windowphone" <?php if($this->vars['osName']=='windowphone'){?>selected="selected"<?php }?>>Windows Phone 7</option>
                                  <option value="wap" <?php if($this->vars['osName']=='wap'){?>selected="selected"<?php }?>>Wap</option>
                                </select>						        <input name="search" type="submit" id="search" value="查找" class="button" /></td>
							  </tr>
							</table>

						</div>
						
					</div>	
				</div>
				<div class="bi-s-bottom"></div>			
			</div>
			</form>
			
			
			
			<div class="clear" style="height:20px;"></div>
			<div class="bi-data">
				<div class="bi-d-top">
					<div class="d-t-left">时段分析</div>
					<div class="d-t-right"><span <?php if(count($this->rows)>0){?>class="show"<?php } else {?>class="hide"<?php }?> id="data_01" onclick="showData('01')" style="cursor:pointer;"></span></div>
				</div>
				<div class="bi-d-center  clear" id="data01">
					<div class="bi-d-center-bg">
					<!--content start-->


					<span class="d-line"></span>
					<div id="content" >
						<table width="710" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:20px">
						  <tr>
						    <td height="25" colspan="9">&nbsp;</td>
					      </tr>
						  <tr>
							<td width="190" height="23" class="bottom_boder_one">&nbsp;</td>
							<td onclick="selCode(4,1)" id="td1" width="80" align="center" class="no_bottom_boder" style="cursor:pointer">启动人数</td>
							<td width="5" align="center" class="bottom_boder_one">&nbsp;</td>
							<td onclick="selCode(4,2)" id="td2" width="80" align="center" class="yes_boder" style="cursor:pointer">启动次数</td>
							<td width="5" align="center" class="bottom_boder_one">&nbsp;</td>
							<td onclick="selCode(4,3)" id="td3" width="80" align="center" class="yes_boder" style="cursor:pointer">订单量</td>
							<td width="5" align="center" class="bottom_boder_one">&nbsp;</td>
							<td onclick="selCode(4,4)" id="td4" width="80" align="center" class="yes_boder" style="cursor:pointer">订单金额</td>
						    <td width="185" class="bottom_boder_one">&nbsp;</td>
						  </tr>
					  </table>

						<script type="text/javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/highcharts/js/highcharts.js"></script>
						<script type="text/javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/highcharts/js/modules/exporting.js"></script>
						<script type="text/javascript">
							var chart;
							$(document).ready(function() {
								chart = new Highcharts.Chart({
									chart: {
										renderTo: 'container',
										defaultSeriesType: 'line',
										marginRight: 5,
										marginBottom: 72
									},
									title: {
										text: '',
										x: -20 //center
									},
									subtitle: {
										text: '',
										x: -20
									},
									xAxis: {
										
										categories: [0, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
										
										
										labels: {
											rotation: 0,
											align: 'center'
										}
									},
									yAxis: {
										title: {
											text: '启动次数'
										},
										plotLines: [{
											value: 0,
											width: 1,
											color: '#808080'
										}]
									},
									tooltip: {
										//enabled: false,
										formatter: function() {
												return '<b>'+ this.series.name +'</b><br/>'+
												this.x + '时: '+ this.y +'次启动';
										}
									},
									legend: {
										style: {
												 font: 'normal 12px Verdana, sans-serif'
											}
									},
									series: [{
										name: '平均',
										data: [<?php echo isset($this->todayData['bootNum']) ? $this->todayData['bootNum'] : '';?>]
									}, {
										name: '昨日',
										data: [<?php echo isset($this->yestodayData['bootNum']) ? $this->yestodayData['bootNum'] : '';?>]
									}, {
										name: '7天前',
										data: [<?php echo isset($this->sevenData['bootNum']) ? $this->sevenData['bootNum'] : '';?>]
									}, {
										name: '30天前',
										data: [<?php echo isset($this->thirtyData['bootNum']) ? $this->thirtyData['bootNum'] : '';?>]
									}]
									
								});
								
								
							});
								
						</script>

						<!-- 3. Add the container -->
						<div id="container2" style="display:none">
							<div id="container" style="width: 710px; height: 300px; position:relative;overflow:hidden;"></div>
						</div>
						
						<script type="text/javascript">
							var chart;
							$(document).ready(function() {
								chart = new Highcharts.Chart({
									chart: {
										renderTo: 'clientnum',
										defaultSeriesType: 'line',
										marginRight: 5,
										marginBottom: 72
									},
									title: {
										text: '',
										x: -20 //center
									},
									subtitle: {
										text: '',
										x: -20
									},
									xAxis: {
										
										categories: [0, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
										
										
										labels: {
											rotation: 0,
											align: 'center'
										}
									},
									yAxis: {
										title: {
											text: '启动人数'
										},
										plotLines: [{
											value: 0,
											width: 1,
											color: '#808080'
										}]
									},
									tooltip: {
										//enabled: false,
										formatter: function() {
												return '<b>'+ this.series.name +'</b><br/>'+
												this.x + '时: '+ this.y +'个启动人数';
										}
									},
									legend: {
										style: {
												 font: 'normal 12px Verdana, sans-serif'
											}
									},
									series: [{
										name: '平均',
										data: [<?php echo isset($this->todayData['bootClientNum']) ? $this->todayData['bootClientNum'] : '';?>]
									}, {
										name: '昨日',
										data: [<?php echo isset($this->yestodayData['bootClientNum']) ? $this->yestodayData['bootClientNum'] : '';?>]
									}, {
										name: '7天前',
										data: [<?php echo isset($this->sevenData['bootClientNum']) ? $this->sevenData['bootClientNum'] : '';?>]
									}, {
										name: '30天前',
										data: [<?php echo isset($this->thirtyData['bootClientNum']) ? $this->thirtyData['bootClientNum'] : '';?>]
									}]
									
								});
								
								
							});
								
						</script>

						<!-- 3. Add the container -->
						<div id="container1">
							<div id="clientnum" style="width: 710px; height: 300px; position:relative;overflow:hidden;"></div>
						</div>
						<script type="text/javascript">
							var chart;
							$(document).ready(function() {
								chart = new Highcharts.Chart({
									chart: {
										renderTo: 'okordernum',
										defaultSeriesType: 'line',
										marginRight: 5,
										marginBottom: 72
									},
									title: {
										text: '',
										x: -20 //center
									},
									subtitle: {
										text: '',
										x: -20
									},
									xAxis: {
										
										categories: [0, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
										
										
										labels: {
											rotation: 0,
											align: 'center'
										}
									},
									yAxis: {
										title: {
											text: '订单量（个）'
										},
										plotLines: [{
											value: 0,
											width: 1,
											color: '#808080'
										}]
									},
									tooltip: {
										//enabled: false,
										formatter: function() {
												return '<b>'+ this.series.name +'</b><br/>'+
												this.x + '时: '+ this.y +'个订单';
										}
									},
									legend: {
										style: {
												 font: 'normal 12px Verdana, sans-serif'
											}
									},
									series: [{
										name: '平均',
										data: [<?php echo isset($this->todayData['okOrderNum']) ? $this->todayData['okOrderNum'] : '';?>]
									}, {
										name: '昨日',
										data: [<?php echo isset($this->yestodayData['okOrderNum']) ? $this->yestodayData['okOrderNum'] : '';?>]
									}, {
										name: '7天前',
										data: [<?php echo isset($this->sevenData['okOrderNum']) ? $this->sevenData['okOrderNum'] : '';?>]
									}, {
										name: '30天前',
										data: [<?php echo isset($this->thirtyData['okOrderNum']) ? $this->thirtyData['okOrderNum'] : '';?>]
									}]
									
								});
								
								
							});
								
						</script>

						<!-- 3. Add the container -->
						<div id="container3"  style="display:none">
							<div id="okordernum" style="width: 710px; height: 300px; position:relative;overflow:hidden;"></div>
						</div>
						<script type="text/javascript">
							var chart;
							$(document).ready(function() {
								chart = new Highcharts.Chart({
									chart: {
										renderTo: 'okOrderAmount',
										defaultSeriesType: 'line',
										marginRight: 5,
										marginBottom: 72
									},
									title: {
										text: '',
										x: -20 //center
									},
									subtitle: {
										text: '',
										x: -20
									},
									xAxis: {
										
										categories: [0, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
										
										
										labels: {
											rotation: 0,
											align: 'center'
										}
									},
									yAxis: {
										title: {
											text: '订单金额（元）'
										},
										plotLines: [{
											value: 0,
											width: 1,
											color: '#808080'
										}]
									},
									tooltip: {
										//enabled: false,
										formatter: function() {
												return '<b>'+ this.series.name +'</b><br/>'+
												this.x + '时: '+ this.y +'元的订单金额';
										}
									},
									legend: {
										style: {
												 font: 'normal 12px Verdana, sans-serif'
											}
									},
									series: [{
										name: '平均',
										data: [<?php echo isset($this->todayData['okOrderAmount']) ? $this->todayData['okOrderAmount'] : '';?>]
									}, {
										name: '昨日',
										data: [<?php echo isset($this->yestodayData['okOrderAmount']) ? $this->yestodayData['okOrderAmount'] : '';?>]
									}, {
										name: '7天前',
										data: [<?php echo isset($this->sevenData['okOrderAmount']) ? $this->sevenData['okOrderAmount'] : '';?>]
									}, {
										name: '30天前',
										data: [<?php echo isset($this->thirtyData['okOrderAmount']) ? $this->thirtyData['okOrderAmount'] : '';?>]
									}]
									
								});
								
								
							});
								
						</script>

						<!-- 3. Add the container -->
						<div id="container4" style="display:none">
							<div id="okOrderAmount" style="width: 710px; height: 300px; position:relative;overflow:hidden;"></div>
						</div>
						
					</div>
					<span class="d-line"></span>
					
					<!--content end-->
					</div>
				</div>
				<div class="bi-d-bottom"></div>
			</div>
			
			
			<div class="clear" style="height:20px;"></div>
			<div class="bi-data">
				<div class="bi-d-top">
					<div class="d-t-left"><?php echo $this->vars['productName'].'&nbsp;&nbsp; '.$this->vars['startTime'];?>
					<?php echo  ($this->vars['endTime'] == $this->vars['startTime']) ? '' : '至 ' .$this->vars['endTime'] ;?> 
					&nbsp;&nbsp;时段分析</div>
					<div class="d-t-right"><span <?php if(count($this->datatoday)>0){?>class="show"<?php } else {?>class="hide"<?php }?> id="data_02" onclick="showData('02')" style="cursor:pointer;"></span></div>
				</div>
				<div class="bi-d-center  clear" id="data02">
					<div class="bi-d-center-bg">
					<!--content start-->
					<span class="d-line"></span>
					<table class="table">
						<tr class="subject">
							<td>时段</td>
							<td>启动次数（%）</td>
							<td>启动人数（%）</td>
							<td>订单量（%）</td>
							<td>订单金额（%）</td>
						</tr>
						<?php 
						foreach($this->datatoday as $key => $row):
						?>

							<tr class="dataLine">
								<td><?php echo $row['hours'] < 10 ? '0' : '';?><?php echo $row['hours'].':00';?></td>
								<td><?php echo $row['bootNum'];?> (<?php echo $row['bootNumPer'];?>%)</td>
								<td><?php echo $row['bootClientNum'];?> (<?php echo $row['clientPer'];?>%)</td>
								<td><?php echo $row['okOrderNum'];?> (<?php echo $row['okOrderPer'];?>%)</td>
								<td><?php echo $row['okOrderAmount'];?> (<?php echo $row['amountPer'];?>%)</td>
							</tr>
						<?php
						endforeach;
						?>
						<tr class="subject">
							  <td>总计</td>
							  <td><?php echo $this->totalArr['totalBootNum'];?></td>
							  <td><?php echo $this->totalArr['totalBootClientNum'];?></td>
							  <td><?php echo $this->totalArr['totalOkOrderNum'];?></td>
							  <td><?php echo $this->totalArr['totalAmount'];?></td>
					  </tr>
				  	</table>
					<!--content end-->
					</div>
				</div>
				<div class="bi-d-bottom"></div>
			</div>
			
			
			
		</div>
	
</div>
</body>
</html>